<template>
	<view class="page_box">
		<u-navbar :is-back="true" title="活动详情" v-if="1" :border-bottom="false" title-color="#000"></u-navbar>

		<view class="content_box padding u-relative ">
			<view class="ww100 h342 bg-white u-relative " @click="l.previewImage([data.image_url])">
				<image :src="data.image_url" mode="aspectFill" class="ww100 h342"></image>
			</view>
			<view class="padding-top">
				<text class="f28 text-black text-bold">{{ data.title }}</text>
			</view>
			<view class="padding-top">
				<text class="f32 text-red text-bold" v-if="data.discount_price == '0.00'">免费</text>
				<text class="f32 text-red text-bold text-price" v-else>{{ data.discount_price }}</text>
			</view>

			<view class="padding  flex flex-direction r15 margin-top" style="background: #FAFAFA;">
				<view class="flex align-center ">
					<image src="../../static/ic4.png" mode="" class="w28 h28 mr10"></image>
					<text class="f24 f">活动时间</text>
					<text style="width: 60vw; overflow: scroll; white-space: nowrap;" class="block f24 ">
						：{{ data.show_time }}
					</text>
				</view>
				<view class="flex align-center mt26">
					<image src="../../static/ic1.png" mode="" class="w28 h28 mr10"></image>
					<text class="f24 f">活动地址</text>
					<text style="width: 65vw; overflow-y: scroll; " class="block f24">：{{ data.address }}</text>
					<!-- <text>：{{data.address}}</text> -->
				</view>
				<view class="flex align-center mt26">
					<image src="../../static/ic3.png" mode="" class="w28 h28 mr10"></image>
					<text class="f24 f">名额</text>
					<text class="f24">：限{{ data.join_count }}人</text>
				</view>
				<view class="flex align-center mt26">
					<image src="../../static/ic2.png" mode="" class="w28 h28 mr10"></image>
					<text class="f24 f">路演</text>
					<view class="align-center justify-between flex " style="width: 70%;">
						<text class="f24">：限{{ data.road_show_count }}人</text>
						<text class="f24" style="color: #F15851;" v-if="data.is_join &&  data.is_member">您已获得路演资格</text>
					</view>
				</view>
			</view>
			<view class="padding bg r15 mt20 ">
				<text class="f24 text-cut block ww100">{{ data.short_content }}</text>
			</view>
			<view class="padding-top-xl">
				<view class="flex justify-center u-relative block padding-top">
					<image src="../../static/jux.png" mode="aspectFill" class="w170 h20 bgimg"></image>
					<text class="f32 text-bold bgtext ">活动介绍</text>
				</view>

				<view class="padding-top">
					<u-parse :html="data.content" :selectable="true" :show-with-animation="true"></u-parse>
				</view>
			</view>
			<view class="h120"></view>
			<view v-if="!data.is_join">
				<button
					class="w690 h100 round btn cu-btn flex align-center justify-center"
					v-if="data.show_status == 1 || data.show_status == 2 || data.show_status == 4"
					style="color: #FFFFFF; background: #CCCCCC;"
				>
					{{
						data.show_status == 1
							? '名额已满'
							: data.show_status == 2
							? '活动已结束'
							: data.show_status == 4
							? '活动中'
							: ''
					}}
				</button>
			</view>

			<view class="flex justify-between btn w690" v-if="!data.is_join && data.show_status == 3">
				<button
					class="w420 h100 round  cu-btn flex align-center justify-center bg-red text-white"
					style=""
					@click="sgnUp"
				>
					立即报名
				</button>
				<button
					class="w240 h100 round  cu-btn flex align-center justify-center "
					style="color: #F15851; background: #FAECEB;"
					@click="show8 = !show8"
				>
					分享
				</button>
			</view>

			<view class="flex justify-between btn w690" v-if="data.is_join">
				<button
					class="w420 h100 round  cu-btn flex align-center justify-center bg-red text-white"
					v-if="data.is_road_show == 0"
				>
					路演待审核
				</button>
				<button
					class="w420 h100 round  cu-btn flex align-center justify-center bg-red text-white"
					v-else-if="data.is_road_show == 1"
				>
					路演审核通过
				</button>
				<button
					class="w420 h100 round  cu-btn flex align-center justify-center bg-red text-white"
					v-else-if="data.is_road_show == 2"
				>
					路演审核不通过
				</button>
				<button
				
					class="w420 h100 round  cu-btn flex align-center justify-center bg-red text-white"
					@click="roadshow"
					v-else-if="data.is_road_show == 9 && data.is_member"
				>
					<text>申请路演</text>
				</button>
				<button
				
					class="w420 h100 round  cu-btn flex align-center justify-center bg-red text-white"
					@click="l.to('/pages/my/myMbr')"
					v-else-if="data.is_road_show == 9 && !data.is_member"
				>
					<text>暂无法申请路演,请成为会员</text>
				</button>
				
				
				<button
					class="w240 h100 round  cu-btn flex align-center justify-center "
					style="color: #F15851; background: #FAECEB;"
					@click="shareIt"
				>
					分享
				</button>
			</view>
			<view class="w100 h100 r50 sgnIn" @click="sgnIn" v-if="data.is_join">
				<image src="../../static/qiandao.png" mode="aspectFill" class="ww100 hh100"></image>
			</view>
		</view>
		<!-- 支付弹框 -->

		<view class="u-mask flex align-center justify-center " v-if="show1" @click="show1 = !show1">
			<view class="rect bg-img flex  flex-direction justify-center animation-scale-up">
				<view class="flex flex-direction align-center ">
					<text class="text-red f30">支付金额</text>
					<text class="text-red text-price text-bold margin-top-sm f46">{{ data.discount_price }}</text>
				</view>

				<view class="flex justify-center  mt66">
					<button
						class="cu-btn  flex align-center justify-center bg-red text-white f30  round w330 h90"
						@click.stop="ordrGeneration"
					>
						<i class="cuIcon-loading2 cuIconfont-spin text-white margin-right-xs" v-if="paymentCircle"></i>
						<text>立即支付</text>
					</button>
				</view>
			</view>
		</view>
		<!-- 支付成功弹框 -->
		<view class="u-mask flex align-center justify-center flex-direction " v-if="show2" @click="show2 = !show2">
			
			<view class="animation-scale-up flex align-center justify-center flex-direction">
				<view class="rect1 bg-img flex  flex-direction  ">
					<view class="rect1_link w530 h370 r20 " style="overflow: hidden;">
						<view class="flex h60 justify-between">
							<view class="flex align-center  f-1 padding-left " style="background: #7685E5;">
								<text class="f24 text-white wt hidden" style="width: 30vw;">
									姓名：{{ infoData.real_name }}
								</text>
							</view>
							<view class="flex align-center  f-1 padding-left" style=" background: #7685E5;">
								<text class="f24 text-white wt hidden" style="width: 30vw;">
									行业：{{ infoData.industry_type }}
								</text>
							</view>
						</view>
						<view class="h60 padding-left flex align-center " style="background: #A3ACE9;">
							<text class="f24 text-white">公司：{{ infoData.company_name }}</text>
						</view>
						<view class="h124 padding flex  " style="background: #7685E5;">
							<i class="f24 text-white wt" style="width: 160rpx; ">我需要的资源：</i>
							<i class="f24 text-white text-left hidden-2">{{ resource_need }}</i>
						</view>
						<view class="h124 padding flex " style="background: #A3ACE9;">
							<i class="f24 text-white wt" style="width: 160rpx; ">我提供的资源：</i>
							<i class="f24 text-white text-left hidden-2">{{ resource_content }}</i>
						</view>
					</view>
				</view>
				<view class="flex flex-direction justify-center align-center" v-if='!data.is_member'>
					<view class="padding bg r15 mt20  ">
						<text class="f24 text-cut block ww100">请申请成为会员-可以享受会员权益</text>
					</view>
					<button
					
						style="background: #F2736D;"
						class="cu-btn  flex align-center justify-center  text-white f30 mt40 round w260 h90 "
						@click="l.to('/pages/my/myMbr')"
					>
						<text>购买会员</text>
					</button>
				</view>
			</view>
		</view>
		<!-- 路演审核弹框 -->
		<view class="u-mask flex align-center justify-center " v-if="show5" @click="show5 = !show5">
			<view class="rect4 bg-img flex  flex-direction  animation-scale-up">
				<view class="flex flex-direction align-center justify-center ">
					<text
						class="text-bold text-black f40  block"
						v-if="data.is_road_show == 0"
						style="margin-top: 330rpx;"
					>
						路演待审核
					</text>
					<view
						class="flex flex-direction justify-center align-center  block"
						style="margin-top: 310rpx;"
						v-if="data.is_road_show == 1"
					>
						<text class="text-bold text-black f40 ">路演审核通过</text>
						<text class="text-black f30 mt20">联系平台管理员发送当期路演的ppt</text>
						<text class="mt20">微信号: {{data.admin_wx }}</text>
					</view>
					<text
						class="text-bold text-black f40  block"
						v-else-if="data.is_road_show == 2"
						style="margin-top: 330rpx;"
					>
						路演审核不通过
					</text>
					<text v-else></text>
				</view>
			</view>
		</view>
		<!-- 不是会员申请路演 -->
		<view class="u-mask flex align-center justify-center" v-if="show3" @click="show3 = !show3">
			<view class="rect2 bg-img flex  flex-direction animation-scale-up">
				<view class="flex flex-direction align-center justify-center ">
					<text class="text-bold text-black f44">申请路演</text>
					<view class="mt45 ">
						<text class="text-black f26  block w480 flex text-center" style="line-height: 1.5;">
							您需要成为会员后邀请{{ data.road_need_count }}人参加活动即可申请路演！
						</text>
					</view>
					<text class="f24 text-gray mt39">
						您已邀请{{ data.invite_activity_count }}/{{ data.road_need_count }}人
					</text>
				</view>
				<view class="flex justify-around">
					<button
						class="cu-btn btn1  flex align-center  justify-center  text-white f30 mt40 round w260 h90"
						open-type="share"
					>
						<text>去邀请</text>
					</button>
					<button
						style="background: #F2736D;"
						class="cu-btn  flex align-center justify-center  text-white f30 mt40 round w260 h90"
						@click="l.to('/pages/my/myMbr')"
					>
						<text>购买会员</text>
					</button>
				</view>
			</view>
		</view>
		<!-- 是会员申请路演 -->
		<view class="u-mask flex align-center justify-center " v-if="show4" @click="show4 = !show4">
			<view class="rect3 bg-img flex  flex-direction animation-scale-up ">
				<view class="flex flex-direction align-center justify-center ">
					<text class="text-bold text-black f44">申请路演</text>
					<view class="mt45 flex justify-center">
						<!-- <text class="text-black f26  block w480 flex justify-center">是否确定申请路演？</text> -->
						<text class="f24 text-gray ">
							您已邀请{{ data.invite_activity_count }}/{{ data.road_need_count }}人
						</text>
					</view>
				</view>
				<view class="flex justify-around">
					<button
						class="cu-btn btn1  flex align-center  justify-center  text-white f30 mt40 round w260 h90"
						@click.stop="show4 = !show4"
					>
						<text>取消</text>
					</button>
					<button
						style="background: #F2736D;"
						class="cu-btn  flex align-center justify-center  text-white f30 mt40 round w260 h90"
						@click.stop="applyForRoadshow"
					>
						<text>确定</text>
					</button>
				</view>
			</view>
		</view>
		<!-- 签到成功弹框 -->
		<view class="u-mask flex align-center justify-center" v-if="show6" @click="show6 = !show6">
			<view class="rect5 bg-img flex  flex-direction animation-scale-up ">
				<text class="f26 ffixd wt block" style="color: #333333;">{{ name }}</text>
			</view>
		</view>
		<!-- 签到未到指定区域 -->
		<view class="u-mask flex align-center justify-center" v-if="show7" @click="isShow7">
			<view class="rect6 bg-img flex  flex-direction animation-scale-up "></view>
		</view>
		<!-- 分享海报 -->
		<view class="u-mask flex align-center justify-center" v-if="show8" @click="show8 = !show8">
			<view
				class="rect7 bg-img flex  flex-direction animation-scale-up  u-relative "
				:style="'background-image: url(' + data.tabloid_url + ');'"
			>
				<view class="flex justify-around ww100  uabd">
					<button class="cu-btn btnn flex align-center justify-center" @click.stop="" open-type="share">
						分享链接
					</button>
					<button
						class="cu-btn btnnn flex align-center justify-center"
						@click.stop="savePic(data.tabloid_url)"
					>
						保存图片
					</button>
				</view>
			</view>
		</view>
		<!-- 活动信息 -->
		<u-popup v-model="show9" mode="bottom" border-radius="14">
			<scroll-view scroll-y="true" style="height: 75vh;" class="padding activityInfo">
				<view class="padding-top padding-bottom-sm flex flex-direction solid-bottom">
					<text class="f28 text-bold text">推荐人姓名</text>
					<input
						type="text"
						value=""
						v-model="invite_name"
						class="margin-top"
						placeholder="请输入推荐人姓名"
						placeholder-class="ddd"
					/>
				</view>
				<view class="padding-top padding-bottom-sm flex flex-direction solid-bottom">
					<text class="f28 text-bold text">是否带产品参会</text>
					<view class="margin-top flex">
						<view class="flex" @click="gender(1)">
							<image
								src="../../static/dui22.png"
								mode="aspectFill"
								class="w30 h30 animation-scale-up"
								v-if="c == 1"
							></image>
							<image src="../../static/dui222.png" mode="aspectFill" class="w30 h30 " v-else></image>
							<text class="ml13">是</text>
						</view>
						<view class="flex ml60" @click="gender(0)">
							<image
								src="../../static/dui222.png"
								mode="aspectFill"
								class="w30 h30 "
								v-if="c == 1"
							></image>
							<image
								src="../../static/dui22.png"
								mode="aspectFill"
								class="w30 h30 animation-scale-up"
								v-else
							></image>
							<text class="ml13">否</text>
						</view>
					</view>
				</view>
				<view class="padding-top padding-bottom-sm flex flex-direction solid-bottom">
					<text class="f28 text-bold text">是否带现场体验的产品</text>
					<view class="margin-top flex">
						<view class="flex" @click="genderr(1)">
							<image
								src="../../static/dui22.png"
								mode="aspectFill"
								class="w30 h30 animation-scale-up"
								v-if="cc == 1"
							></image>
							<image src="../../static/dui222.png" mode="aspectFill" class="w30 h30 " v-else></image>
							<text class="ml13">是</text>
						</view>
						<view class="flex ml60" @click="genderr(0)">
							<image
								src="../../static/dui222.png"
								mode="aspectFill"
								class="w30 h30 "
								v-if="cc == 1"
							></image>
							<image
								src="../../static/dui22.png"
								mode="aspectFill"
								class="w30 h30 animation-scale-up"
								v-else
							></image>
							<text class="ml13">否</text>
						</view>
					</view>
				</view>
				<view class="padding-top padding-bottom-sm flex flex-direction solid-bottom" v-if="data.is_member == 1">
					<text class="f28 text-bold text">是否申请路演</text>
					<view class="margin-top flex">
						<view class="flex" @click="genderrr(1)">
							<image
								src="../../static/dui22.png"
								mode="aspectFill"
								class="w30 h30 animation-scale-up"
								v-if="ccc == 1"
							></image>
							<image src="../../static/dui222.png" mode="aspectFill" class="w30 h30 " v-else></image>
							<text class="ml13">是</text>
						</view>
						<view class="flex ml60" @click="genderrr(2)">
							<image
								src="../../static/dui222.png"
								mode="aspectFill"
								class="w30 h30 "
								v-if="ccc == 1"
							></image>
							<image
								src="../../static/dui22.png"
								mode="aspectFill"
								class="w30 h30 animation-scale-up"
								v-else
							></image>
							<text class="ml13">否</text>
						</view>
					</view>
				</view>
				<view class="padding-top padding-bottom-sm flex flex-direction ">
					<text class="f28 text-bold text">我能提供的资源</text>
					<view class="padding margin-top" style="background: #F7F7F7;">
						<textarea
							value=""
							v-model="resource_content"
							placeholder="请输入提供的资源"
							placeholder-class="fff"
							style="font-size: 28rpx;"
						/>
					</view>
				</view>

				<view class="padding-top padding-bottom-sm flex flex-direction ">
					<text class="f28 text-bold text">我需要的资源</text>
					<view class="padding margin-top" style="background: #F7F7F7;">
						<textarea
							value=""
							v-model="resource_need"
							placeholder="请输入我需要的资源"
							placeholder-class="fff"
						/>
					</view>
				</view>
				<view class="h120"></view>
			</scroll-view>
			<button class="cu-btn btn2 flex align-center justify-center" @click.stop="dataModification">
				<text>提交</text>
			</button>
		</u-popup>
		<yy-login v-if="vuex_login"></yy-login>
		<yy-loading text="加载中.." mask="true" click="true" ref="loading"></yy-loading>
		<u-toast ref="uToast" />
	</view>
</template>

<script>
import amap from '@/commonsdk/SDK/amap-wx.js';

export default {
	data() {
		return {
			//1 名额已满
			//2 活动已结束
			//3 可报名
			//4 活动中
			//5 已报名
			c: 1,
			cc: 1,
			ccc: 1,
			show1: false, // 支付弹框
			paymentCircle: false, // 支付圈圈
			show2: false, // 支付成功之后弹框
			show3: false, // 会员和不是会员的路演弹框
			show4: false, // 会员和不是会员的路演弹框
			show5: false, // 路演审核状态弹框
			show6: false, // 签到成功弹框
			show7: false, // 签到失败弹框
			show8: false, // 分享弹框
			show9: false, // 活动前的报名信息
			id: '',
			data: {},
			participate: '', //是否填写资料
			infoData: [], // 填写资料的数据
			time: true,
			name: '', //当前位置
			participateList: {},
			invite_name: '', //邀请人姓名
			is_take_product: 1, //是否带产品参会
			is_experience_product: 1, //是否带现场体验产品 0  否 1 是
			resource_content: '', // 我能提供人员资源
			resource_need: '', // 需要的资源
			is_road_show: 1 // 是否路演 0 否 1 是
		};
	},
	onShow() {
		console.log('this.participateList :>> ', this.participateList);
	},
	onLoad(e) {
		this.id = e.id;
		this.evntDetails(e.id);
		this.getInfo();
	},
	watch: {
		participate(newValue, oldValue) {
			console.log('newValue: ', newValue);
			if (newValue) {
				this.evntDetails(this.id);
				// this.show1 = !this.show1;
				this.getInfo();
			}
		}
	},
	methods: {
		async gender(e) {
			this.c = e;
			this.is_take_product = e;
		},
		async genderr(e) {
			this.cc = e;
			this.is_experience_product = e;
		},
		async genderrr(e) {
			this.ccc = e;
			this.is_road_show = e;
		},
		// 报名前的提交
		async dataModification() {
			if (
				[
					this.invite_name,
					this.is_take_product,
					this.is_experience_product,
					this.resource_content,
					this.resource_need
				].includes('')
			) {
				return this.$refs.uToast.show({ title: '请填写完整后再提交', type: 'error' });
			}
			this.show9 = !this.show9;
			this.show1 = !this.show1;
			console.log('this.show9 :>> ', this.show9);
		},
		async savePic(url) {
			const that = this;
			uni.downloadFile({
				url,
				success: res => {
					if (res.statusCode == 200) {
						uni.saveImageToPhotosAlbum({
							filePath: res.tempFilePath,
							success: function() {
								this.$refs.uToast.show({ title: '保存成功', type: 'success' });
							},
							fail: function() {
								this.$refs.uToast.show({ title: '保存失败，请稍后重试', type: 'error' });
							}
						});
					} else {
						this.$refs.uToast.show({ title: '下载失败', type: 'error' });
					}
				}
			});
		},
		async isShow7() {
			this.show7 = !this.show7;
		},
		//获取填写的资料
		async getInfo() {
			const res = await this.$u.post('UserInfo/extendsInfo', {}, {});
			console.log('res >>  ', res);
			this.infoData = res.data;
		},
		// 分享
		async shareIt() {
			this.show8 = !this.show8;
		},
		//签到
		async sgnIn() {
			this.amapPlugin = new amap.AMapWX({
				//高德地图KEY，随时失效，请务必替换为自己的KEY，参考：http://ask.dcloud.net.cn/article/35070
				key: 'b9f002e72df0b071c51a8237c18b07a5'
			});
			uni.showLoading({
				title: '获取信息中'
			});
			this.amapPlugin.getRegeo({
				success: data => {
					console.log('data: ', data);
					// data[0].latitude  data[0].longitude
					this.name = data[0].name;
					this.getDistance(data[0].latitude, data[0].longitude, this.data.lat, this.data.lgt);
				}
			});
		},
		async getDistance(lat1, lng1, lat2, lng2) {
			var radLat1 = (lat1 * Math.PI) / 180.0;
			var radLat2 = (lat2 * Math.PI) / 180.0;
			var a = radLat1 - radLat2;
			var b = (lng1 * Math.PI) / 180.0 - (lng2 * Math.PI) / 180.0;
			var s =
				2 *
				Math.asin(
					Math.sqrt(
						Math.pow(Math.sin(a / 2), 2) +
							Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)
					)
				);
			s = s * 6378.137; // EARTH_RADIUS; 调用 return的距离单位为m
			s = Math.round(s * 10000) / 10;
			console.log('s :>> ', s);
			uni.hideLoading();

			if (Number(s) <= 500) {
				this.show6 = !this.show6;
				this.time = false;
				this.sgnInSuccessfully();
			} else {
				this.show7 = !this.show7;
				this.time = false;
			}
		},
		//签到同步到后端
		async sgnInSuccessfully() {
			let obj = {
				activity_id: this.data.id
			};
			const res = await this.$u.post('UserInfo/activitySign', obj, {});

			console.log('res >>  ', res);
		},

		async evntDetails(id) {
			let obj = {};
			const res = await this.$u.post('index/detail?id=' + id, obj, {});
			this.data = res.data;
			if (res.data.is_road_show == 0 || res.data.is_road_show == 1 || res.data.is_road_show == 2) {
				this.show5 = true;
			}
		},
		//报名
		async sgnUp() {
			//0 未填写  1 填写
			if (this.data.is_user_extend) {
				// this.show1 = !this.show1;
				// this.getInfo();
				this.show9 = !this.show9;
			} else {
				this.l.to('/pages/index/fillInTheInfo?is_member=' + this.data.is_member);
			}
		},
		//订单号生成
		async ordrGeneration() {
			// 开始圈圈
			this.paymentCircle = !this.paymentCircle;
			let obj = {};
			const res = await this.$u.post('/Order/generateOrder', obj);
			let order_sn = res.data.order_sn;
			this.creIntfc(order_sn);
		},
		//创建接口
		async creIntfc(order_sn) {
			let obj = {
				order_sn,
				activity_id: this.id,
				pay_type: 1,
				pay_money: this.data.discount_price,
				invite_code: uni.getStorageSync('share_code'),
				invite_name: this.invite_name,
				is_take_product: this.is_take_product,
				is_experience_product: this.is_experience_product,
				resource_content: this.resource_content,
				resource_need: this.resource_need
			};
			console.log('obj: ', obj);

			const res = await this.$u.post('Order/activityOrder', obj, {});
			if (!res.code) return;
			// 吊起支付的判断
			if (this.data.discount_price > 0) {
				let data = res.data;
				uni.requestPayment({
					provider: data.provider,
					timeStamp: data.timestamp,
					nonceStr: data.nonceStr,
					package: data.package,
					signType: data.signType,
					paySign: data.paySign,
					success: res => {
						uni.removeStorageSync('share_code');
						this.$refs.uToast.show({ title: '支付成功', type: 'success' });
						console.log('success:' + JSON.stringify(res));
						// 关闭圈圈
						this.paymentCircle = !this.paymentCircle;
						this.show1 = !this.show1;
						this.show2 = !this.show2;
						this.evntDetails(this.id);
					},
					fail: err => {
						this.show1 = !this.show1;
						// 关闭圈圈
						this.paymentCircle = !this.paymentCircle;
						this.$refs.uToast.show({ title: '支付失败', type: 'error' });
						console.log('fail:' + JSON.stringify(err));
					}
				});
			} else {
				this.evntDetails(this.id);
				this.paymentCircle = !this.paymentCircle;
				this.show1 = !this.show1;
				this.show2 = !this.show2;
			}
		},
		// 是会员不是会员的弹框
		async roadshow() {
			
		
			if (this.data.is_member) {
				// 是会员
				this.show4 = !this.show4;
			} else {
				// 不是会员\
				console.log('不是会员 :>> ',111 );
				if (this.data.invite_activity_count < this.data.road_need_count) {
					this.show3 = !this.show3;
				} else {
					this.show4 = !this.show4;
				}
			}
		},
		// 是会员的申请路演
		async applyForRoadshow() {
			let obj = {
				activity_id: this.id
			};
			const res = await this.$u.post('/order/roadShow', obj);
			if (res.code == 0) {
				this.show4 = false;
				this.show3 = false;
				return;
			} else {
				this.show4 = false;
				this.show3 = false;
				this.$refs.uToast.show({ title: res.msg, type: 'success' });
				this.evntDetails(this.id);
			}
			console.log('res >>  ', res);
		},
		// 不是会员的申请路演
		async notAMbr() {}
	},
	onShareAppMessage() {
		//发送给朋友
		return {
			title: this.data.title + this.data.share_code,
			path: '/pages/index/index?id=' + uni.getStorageSync('data').user.id + '&share_code=' + this.data.share_code,
			imageUrl: this.data.image_url, //显示图片长宽比是 5:4
			success: function(res) {
				if (res.errMsg == 'shareAppMessage:ok') {
					this.$refs.uToast.show({ title: '分享成功', type: 'success' });
				}
			}
		};
	}
};
</script>

<style lang="scss" scoped>
page {
}
.activityInfo {
	// /deep/input,
	// .ddd {
	// 	color: #333333;
	// 	font-family: PingFang SC;
	// }
	// /deep/.fff {
	// 	color: #333333;
	// 	font-size: 28rpx !important;
	// 	font-family: PingFang SC;
	// }
	// textarea {
	// 	color: #333333;
	// 	font-family: PingFang SC;
	// 	font-size: 28rpx !important;
	// }
}

.page_box {
	.sgnIn {
		position: fixed;
		right: 30rpx;
		bottom: 160rpx;
	}
	.u-mask {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		background-color: rgba(127, 127, 127, 0.7);
		transition: transform 0.3s;
		z-index: 9999;
		.rect {
			width: 590rpx;
			height: 618rpx;
			background-image: url(https://sprtcar.oss-cn-chengdu.aliyuncs.com/home/20210617123133.png);
		}
		.rect1 {
			position: relative;
			width: 600rpx;
			height: 740rpx;
			padding-top: 345rpx;
			background-image: url(https://sprtcar.oss-cn-chengdu.aliyuncs.com/home/20210709110816.png);
			.rect1_link {
				position: absolute;
				left: 50%;
				bottom: 30rpx;
				transform: translateX(-50%);
			}
		}
		.rect2 {
			width: 610rpx;
			height: 780rpx;
			padding-top: 396rpx;
			background-image: url(https://sprtcar.oss-cn-chengdu.aliyuncs.com/home/20210617140722.png);
		}
		.rect3 {
			width: 610rpx;
			height: 700rpx;
			padding-top: 396rpx;
			background-image: url(https://sprtcar.oss-cn-chengdu.aliyuncs.com/home/20210617142437.png);
		}
		.rect4 {
			width: 520rpx;
			height: 652rpx;
			// padding-top: 330rpx;
			background-image: url(https://sprtcar.oss-cn-chengdu.aliyuncs.com/home/20210624153648.png);
		}
		.rect5 {
			width: 610rpx;
			height: 618rpx;

			background-image: url(https://sprtcar.oss-cn-chengdu.aliyuncs.com/home/20210709103840.png);
		}
		.rect6 {
			width: 580rpx;
			height: 700rpx;

			background-image: url(https://sprtcar.oss-cn-chengdu.aliyuncs.com/home/20210709104030.png);
		}
		.rect7 {
			width: 680rpx;
			height: 900rpx;
			// background-image: url(https://sprtcar.oss-cn-chengdu.aliyuncs.com/home/20210713100053.png);
			.uabd {
				position: absolute;
				left: 50%;
				bottom: 55rpx;
				transform: translateX(-50%);
			}
			.timg {
				position: relative;
				image {
					position: absolute;
					left: 0;
					bottom: -5rpx;
					z-index: -1;
				}
				text {
					z-index: 1;
					font-weight: 500;
				}
			}
			.infoImg {
				background-image: url(https://sprtcar.oss-cn-chengdu.aliyuncs.com/home/20210709140722.png);
			}
			.btnn {
				width: 240rpx;
				height: 80rpx;
				//background: transparent;
				border: 2rpx solid #e78822;
				border-radius: 40rpx;
				color: #e78822;
				font-size: 30rpx;
			}
			.btnnn {
				width: 240rpx;
				height: 80rpx;
				//background: transparent;
				background: #e78822;
				border-radius: 40rpx;
				font-size: 30rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #ffffff;
			}
		}
		.ffixd {
			position: absolute;
			top: 59%;
			left: 50%;
			transform: translateX(-50%);
		}
		.ddd,
		input {
			color: #999999;
			font-weight: 500;
			font-size: 26rpx;
		}
		.tt {
			display: inline-block;
			text-align-last: justify;
			width: 150rpx;
			// white-space: nowrap;
		}
	}

	.u-mask-show {
		opacity: 1;
	}

	.u-mask-zoom {
		transform: scale(1.2, 1.2);
	}

	.f {
		display: inline-block;
		width: 120rpx;
		text-align-last: justify;
	}
	.bg {
		background-color: #fffaf5;
		text {
			color: #f48004;
		}
	}
	.bgimg {
		position: absolute;
		bottom: -5rpx;
		left: 50%;
		transform: translateX(-50%);
	}
	.bgtext {
		position: absolute;
		bottom: 0;
		left: 50%;
		transform: translateX(-50%);
		z-index: 10;
	}
	.lh1 {
		line-height: 1.8;
	}
	.btn {
		position: fixed;
		bottom: calc(env(safe-area-inset-bottom) / 2);
		left: 50%;
		transform: translateX(-50%);
	}

	.btn2 {
		position: fixed;
		bottom: calc(env(safe-area-inset-bottom) / 2);
		left: 50%;
		transform: translateX(-50%);
		width: 690rpx;
		height: 100rpx;
		background: #f2736d;
		border-radius: 50rpx;
		z-index: 999;
		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: bold;
		color: #ffffff;
	}
	.btn1 {
		border: 1rpx solid #ffb1ad;
		background: #f2f0ff;
		color: #f2736d;
	}
}

.content_box {
}
</style>
